#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'dong'


from bs4 import BeautifulSoup


def get_viewstate(context=None):
    '''
    获取 __VIEWSTATE
    :param context:
    :return:
    '''
    soup = BeautifulSoup(open('a.html'), 'html.parser')
    viewstate = soup.find(id='__VIEWSTATE')
    if viewstate is not None:
        return viewstate["value"]
    else:
        return 0

if get_viewstate():
    print get_viewstate()
else:
    print '==='
